//变量定义

//先来一句经典的语句,Open Swift World of u own

print("Open Swift World of u own")

//定义变量
var myVariable = 32 

myVariable = 53//可改变的值

//定义常量
let  myConstant = 42 //无法改变值

print("\(myVariable),\(myConstant)")


//
var a:Int = 80
print("\(a)") //80

var str:String = "Hello"
print("\(str)")

var d:Double = 80
print("\(d)")// 80.0

//字符串链接
var label:String = "Word is "

var com = label + str 

print("\(com)")

let words = 23

/**
	That would be a error:binary operator '+' cannot be applied to operands of type 'String' and 'Int'
	let wordsLabel = label + words
	print("\(wordsLabel)")

**/

let wordsLabel = label + String(words)
print("\(wordsLabel)") //Word is 23

//定义元数组
var s = (1,"No 1","No 2")

print(s.2)//No 2

// 
//总交易时间：9:30 － 11.30，1-3 共四小时
var totalTime:Int = 4 * 3600 

//每秒成交50单 ＊ 10  ＝ 500 手 ＝ 50000 股

var valueOfStock = 20 

var cje = 50000 * 20 * totalTime 


var liang = 876535342 
print("每秒成交额为：\(liang/totalTime)");
print("每秒成交的股份数目：\(liang/totalTime/50*100)");
print("\(cje)");















